mastermind question from SQL class 12